home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir31
/
gmp002.zip
/
GMP002.DOC
< prev
next >
Wrap
Text File
|
1993-11-11
|
9KB
|
194 lines
GUS MIDI Player, version 0.02 Alpha - INTERNAL USE ONLY - 11-Nov-93
History:
0.02 - Added MIDI channel mask CL option, detailed below
- Fixed drum channel not drumming in 0.01
- Erc: returned in decimal instead of hex to match codes below
- Display more voice status info
0.01 - Yeah, well, what can I say (having fun, though)
Okay, so after four months I have something for you! The toolkit will be
made available able to on the BBS in the Ruckus developer's conference
as soon as we get some basic testing done. This program contains the
generic MIDI parser and the static LIB version of the GUS support code.
The dynamic DLX version will be tested at a later (same code, just
a couple of small load/management modules, in addition).
Back to this program. Here's what you need:
1. 286 or higher CPU - the GUS support code was written using
a few 286 instructions that made a world of difference.
Only high-end cards will have 286+ code. The AdLibs, OPL2s,
will run just fine with an 8088. 1MB of GRAM probably is
a good idea. All patches are loaded in native form (16-bit,
full sample).
2. These environment variables must be set:
ULTRASND=260,7,7,11,11
rem ULTRADIR=F:\SND\_GUS (not used by Ruckus)
PATDIR=F:\SND\_GUS\MIDI
rem DLXDIR=F:\PRG\ASM\R2\_DLX (not needed now)
In other words, set the ULTRASND= eVar to something that
works for your system. The above is my setting. the PATDIR=
eVar is the location of the GUS patch files (patch file
version 1.10). The old patch files may not work. Anyway,
everyone should have their GUS 2.06 disks by now. The new
patches are on these disks (5.5MB worth!). BTW, this should work:
SET PATDIR=%ULTRADIR%\MIDI
You'll probably need the ULTRADIR= for other GUS software.
The DLXDIR= is for locating the dynamic link modules. You'll
know all about these later.
3. That's it. To use the program, GMP002.EXE, you have these
command-line options:
C>gmp001 pathname.ext /Vnn /Cnnn?
pathname.ext can be any valid DOS pathname to a valid
MIDI file. GMP002.EXE is setup to play over MIDI channels
0 to 9, with the percussion on 9 (1-10 for 1-based folk).
This is just to simplify running Windows CANYON.MID file,
which is a dual-sequenced MIDI file. Ruckus can deal with
it, but the interface is not setup yet (i.e., for the
control program -- itself only about 120 lines of assembly).
The default patch is 0, acpiano.pat. Ruckus allows for
remapping patchnames, patch numbers, banks, and so on, but
again, the interface isn't set up (hey, though it's small,
there's four months of work in here). Enough on this for now.
The /Vnn is for the number of voices to use. The default is
32 (1-based). You can use any value from 14 to 32. The number
at the top-middle during play is the number of voices "stolen".
The less voices, the more likely this will zoom right along.
The numbers at the top-left are the current MIDI tick-toc, in
hex and decimal. As for the table, that's for you to guess
at for now.
The /Cnnn? is to override the default channels selected. You
can enter either a hex, binary, or if you can figure it out,
decimal number here. Hex values must be followed with an "h",
and binary either a "b" or "y". E.g.:
/C3FFh channels 0-9
/C3F0h channels 4-9
/C111b channels 0-2
/C1111111b 0-6
/C1000011111y 0-4,9
/C01000011111b 0-4,9
/FFFFh 0-15 (all)
/-1 may also work as 0-15, maybe not
At startup the current channel map is shown, just to make sure.
Pressing Esc at any time exits. The on-board timer is used
so your system time won't be affected if there are any
system hangs, etc. The PC timer can also be used, but again,
no interface set up.
If there's a problem, the program should tell you the error code
in deciaml format. The error codes are at the end of the docs.
Those < 150 or so should be DOS error codes. Higher are Ruckus.
Just make a note of any problems you have. If you get a lock up,
try running GMP002.EXE from DEBUG. There's still much debug code
in there and INT 3 breakpoints around weak areas. If you get a
break at an INT 3, let me know the address of the break and also
the MIDI file you used, voices, etc. Had enough talk? Go for it.
4. You can contact me through the BBS, preferably in the developer's
conference, or through my Fido point (Cornel Huth @ 1:387/800.8),
or via Internet (chuth@lonestar.utsa.edu). As for other cards,
the SB16 (CSP), PAS-16, Arai-based cards, and a refinement of
the previous cards supported will also be in the toolkit. I'll
keep a steady flow of alphas/betas in the conference's download
area. Just keep me posted on any problems.
5. One more thing. GMP002.EXE uses a default program/patch load just
in case. I've got it set to load patch 0, or ACPIANO.PAT. Yeah, I
could also post the list of filenames<->patches, but you can
figure out that (tip: the 2.06 manual has lots of errors). There's
still some loose ends, and I've got to do some more work on the
volume mapping (kind of scratchy at times -- maybe that's also
somewhat related to the loose ends..., anyway).
<Error List:Prelim>
;temporary RM errors
ERR_MIDI_DEVICE EQU -1
ERR_ILLEGAL_CMD EQU 200
ERR_MIDI_INIT EQU 210
ERR_MIDI_FORMAT EQU 211
ERR_MIDI_TRACKS EQU 212
ERR_MIDI_TIMING EQU 213
ERR_MIDI_HEADER EQU 214
ERR_MIDI_CHNUM EQU 215
ERR_NODEVICE EQU 220
ERR_NOTINGEAR EQU 223
ERR_INGEAR EQU 224
ERR_UNKFILE EQU 225
ERR_NOCHANNEL EQU 226
ERR_NOXMM EQU 227
ERR_BADMODE EQU 228
ERR_INVFMT EQU 229
ERR_NOT_ENOUGH_MEMORY EQU 8 ;a DOS error
ERR_UNXEOF EQU -3 ;unexpected end of file
ERR_DISKFULL EQU -2 ;disk full
ERR_INVALID_TASK EQU 254 ;most likely just an internal error
ERR_BADPATH EQU 242 ;path+patchname+ext > MAX_PATHSIZE
ERR_BADENVVAR EQU 241
ERR_NOMATCH EQU 240
ERR_PATCHZERO EQU 235 ;patch number is not allocated/no patch data
ERR_PATCHINUSE EQU 234 ;patch number is in use (gfPatchAlloc)
ERR_NOCACHE EQU 233 ;no cache available for patch caching
ERR_BADPATCH EQU 232 ;patch format not handled
ERR_UNKPATCH EQU 231
ERR_BADPATCHNO EQU 230 ;MIDI patch/drum number out-of-range
ERR_VOICERUNNING EQU 224 ;voice is running (cannot unassign; stop first)
ERR_VOICENA EQU 223 ;voice is not available
ERR_NOVOICE EQU 222 ;voice is not valid
ERR_INVADDR EQU 221 ;SetVoiceParm begin/loopstart/loopend invalid
ERR_NODEVICE EQU 220
ERR_DMA_TIMEOUT EQU 212
ERR_DMA_BADCMD EQU 211
ERR_DMA_BUSY EQU 210
ERR_NOMEMORY EQU 199 ;no/not enough memory from ss$Malloc for MCB
ERR_NOHANDLES EQU 198 ;no handles left from ss$Malloc for MCB
ERR_MEMCORRUPT EQU 197 ;memory corrupt from ss$Malloc for MCB
ERR_BADHANDLE EQU 196 ;handle not valid from ss$Free for MCB/xms$ too
ERR_NOXMSMGR EQU 189 ;xms$Init called but no XMS manager installed
ERR_XMS16MB EQU 188 ;XMS allocation crossed 16MB (no-go for ISA DMA)
;GF-specific error codes found in gf@error
EGF_INTERNAL EQU (1 SHL 8)+1 ;internal coding error
EGF_UNKPATCH EQU (ERR_BADPATCH SHL 8)+10 ;patch doesn't start w/ GF...
EGF_INSTR_GT1 EQU (ERR_BADPATCH SHL 8)+11 ;more than 1 instrument in patch
EGF_LAYER_GT1 EQU (ERR_BADPATCH SHL 8)+12 ;more than 1 layer in patch
EGF_DATASIZE EQU (ERR_NOMEMORY SHL 8)+13 ;patch datasize not even-32
EGF_NOMEMORY EQU (ERR_NOMEMORY SHL 8)+14 ;not enough GRAM for patch
EGF_NOPATCH EQU (ERR_BADPATCHNO SHL 8)+15 ;patch is not loaded
EGF_VOICEINUSE EQU (ERR_VOICENA SHL 8) + 16 ;VIB.running<>0 for patch assign
EGF_NOFREEVOICE EQU (ERR_VOICENA SHL 8) + 17 ;no free voices (patch assign)
EGF_NOMEMVIB EQU (ERR_NOMEMORY SHL 8)+30 ;DOS mem for VIBs in gfReset
<EOF>